package com.tedu.pj.common.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author Song
 * @since 2020/10/15
 */
@Data
@NoArgsConstructor
public class Response implements Serializable {


    private static final long serialVersionUID = 6896101184193301670L;
    Integer state=1;
    String msg="ok";
    Object data;

    public Response(String msg) {
        this.msg = msg;
    }

    public Response(Object data) {
        this.data = data;
    }

    public Response(Throwable e){
        this.state=0;
        this.msg=e.getMessage();
    }
}
